package _13;

public class _String {
    public static void main(String[] args) {
        String sa = "String-Compare";
        String sb = new String("String-Compare");
        String sc = sa;
        if (sa == sb) {
            System.out.println("sa = sb is true");
        }else {
            System.out.println("sa = sb is false");
        }
        if (sa == sc){
            System.out.println("sa = sc is true");
        }else{
            System.out.println("sa = sc is false");
        }
        if (sa.equals(sb)){
            System.out.println("sa与sb的内容相同");
        }else{
            System.out.println("sa与sb的内容不相同");
        }
        if (sa.equals(sc)){
            System.out.println("sa与sc的内容相同");
        }else{
            System.out.println("sa与sc的内容不相同");
        }
    }
}
